package hlhj.fhp.newslib.adapters

import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentPagerAdapter
import java.util.ArrayList

/**
 * Created by Administrator on 2018\6\5 0005.
 */
class FragmentAdp(fragmentManager: FragmentManager,private val fgmList:ArrayList<Fragment>) :FragmentPagerFlushAdapter(fragmentManager) {
    override fun getItem(position: Int): Fragment {
        return  fgmList.get(position)
    }

    override fun getCount(): Int {
        return fgmList.size
    }

    override fun getPageTitle(position: Int): CharSequence? {
        return fgmList[position].arguments!!.getString("name")

    }
}